Application specific integrated circuit accelerators

ABSTRACT

A tile including circuitry for use with machine learning models, the tile including: a first computational array of cells, in which the computational array of cells is a sub-array of a larger second computational array of cells; local memory coupled to the first computational array of cells; and multiple controllable bus lines, in which a first subset of the multiple controllable bus lines include multiple general purpose controllable bus lines couplable to the local memory.

CROSS-REFERENCE TO RELATED APPLICATION

This patent application is a continuation of U.S. patent applicationSer. No. 17/135,607, filed Dec. 28, 2020, which is a continuation of,and claims the benefit of priority under 35 USC 120 of, U.S. patentapplication Ser. No. 16/042,752, filed Jul. 23, 2018, which claims thebenefit of U.S. Provisional Application No. 62/535,612, filed Jul. 21,2017, the contents of which are incorporated by reference.

TECHNICAL FIELD

The present disclosure relates to application specific integratedcircuit accelerators and methods for operating the same.

BACKGROUND

Neural networks are machine learning models that employ one or morelayers of models to generate an output, e.g., a classification, for areceived input. Some neural networks include one or more hidden layersin addition to an output layer. The output of each hidden layer is usedas input to the next layer in the network, i.e., the next hidden layeror the output layer of the network. Each layer of the network generatesan output from a received input in accordance with current values of arespective set of parameters.

Some neural networks include one or more convolutional neural networklayers. Each convolutional neural network layer has an associated set ofkernels. Kernels can be represented as a matrix structure of weightinputs. Each convolutional layer can also process a set of activationinputs. The set of activation inputs can also be represented as a matrixstructure.

Some existing systems perform computations for a given convolutionallayer in software. For example, the software can apply each kernel forthe layer to the set of activation inputs. That is, for each kernel, thesoftware can overlay the kernel, which can be representedmulti-dimensionally, over a first portion of activation inputs, whichcan be represented multi-dimensionally. The software can then compute adot product from the overlapped elements. The dot product can correspondto a single activation input, e.g., an activation input element that hasan upper-left position in the overlapped multi-dimensional space. Forexample, using a sliding window, the software then can shift the kernelto overlay a second portion of activation inputs and calculate anotherdot product corresponding to another activation input. The software canrepeatedly perform this process until each activation input has acorresponding dot product. In some implementations, the dot products areinput to an activation function, which generates activation values. Theactivation values can be combined, e.g., pooled, before being sent to asubsequent layer of the neural network.

SUMMARY

In general, in some aspects, the subject matter of the presentdisclosure encompasses a tile including circuitry for use with machinelearning models, in which the tile includes: a first computational arrayof cells, in which the computational array of cells is a sub-array of alarger second computational array of cells; local memory coupled to thefirst computational array of cells; multiple controllable bus lines, inwhich a first subset of the multiple controllable bus lines includesmultiple general purpose controllable bus lines couplable to the localmemory.

Implementations of the tile may include one or more of the followingfeatures. For example, in some implementations, the multiple generalpurpose controllable bus lines includes: a first group of generalpurpose controllable bus lines extending along a first dimension of thetile; a second group of general purpose controllable bus lines extendingalong a second dimension of the tile that is different from the firstdimension. The first group of general purpose controllable bus lines mayinclude: at least one general purpose controllable bus line configuredto transfer data in a first direction along the first dimension; and atleast one general purpose controllable bus line configured to transferdata in a second opposite direction along the first dimension. Thesecond group of general purpose controllable bus lines may include: atleast one general purpose controllable bus line configured to transferdata in a first direction along the second dimension; and at least onegeneral purpose controllable bus line configured to transfer data in asecond opposite direction along the second dimension.

In some implementations, the tile includes a multiplexer, in which anoutput of the multiplexer is coupled to the local memory, and in whichat least two of the general purpose controllable bus lines are coupledto an input of the multiplexer. The tile may include a register coupledto an input select line of the multiplexer. Each general purposecontrollable bus line may include a conveyer element. The conveyerelement may include a flip-flop.

In some implementations, a second subset of the multiple controllablebus lines includes multiple partial sum controllable bus lines, in whichthe partial sum controllable bus lines are couplable to the first arrayof sub-cells, in which the partial sum controllable bus lines of themultiple partial sum controllable bus lines are coupled to another tileof the larger second computational array of cells, and are configured toreceive a partial sum from, or transfer a partial sum to, the other tileof the larger second computational array of cells. Each partial sumcontrollable bus line of the multiple partial sum controllable bus linesis further coupled to a vector processing unit.

In some implementations, a second subset of the multiple controllablebus lines consists of a single partial sum controllable bus line, thesingle partial sum controllable bus line is configured to receive a sumobtained by the first array of cells.

In some implementations, the second computational array of cells is asystolic array.

In some implementations, the local memory is configured to receiveweight input data, activation input data, and/or instructions from acircuit element external to the tile. The circuit element external tothe tile may be a communication interface of an application specificintegrated circuit.

In some implementations, the first subset of the multiple controllablebus lines are also coupled to the circuit element external to the tilesuch that, during operation of the circuit, the weight input data, theactivation input data, and/or the instructions are passed along thefirst subset of controllable bus lines to the local memory.

In some implementations, the first subset of the multiple controllablebus lines is wired directly to a second tile that encompasses anadditional sub-array of the second larger array of cells. The firstsubset of the multiple controllable bus lines skip over a third tilethat encompasses yet another sub-array of the second larger array ofcells.

In general, in some aspects, the subject matter of the presentdisclosure encompasses methods of operating an application specificintegrated circuit (ASIC) chip including a tile, the tile including (1)a first computational array of cells that is a sub-array of a largersecond computational array of cells, (2) local memory coupled to thefirst computational array of cells, and (3) multiple controllable buslines, in which the method includes: loading, from a first subset of thecontrollable bus lines, multiple weight inputs into the local memory ofthe first tile; transferring a first group of the weight inputs to cellsof the first computational array from the local memory; receivingmultiple activation inputs at cells of the first computational array;and performing a computation with the computational array of cells,using the first group of weight inputs and the multiple activationinputs, to provide multiple outputs.

Implementations of the methods may include one or more of the followingfeatures. For example, in some implementations, loading the multipleweight inputs into the local memory of the first tile includes receivingan input select signal at a multiplexer that is coupled to the firstsubset of controllable bus lines. The multiplexer may be coupled to anadditional subset of controllable bus lines, and to the local memory.Receiving the input select signal at the multiplexer may includesreceiving the input select signal from a register coupled to themultiplexer. The methods may further include: receiving the input selectsignal from a second tile of the ASIC; and storing the input selectsignal in the register prior to passing the input select signal to themultiplexer.

In some implementations, the multiple activation inputs are receivedfrom the local memory. The methods may further include: prior to themultiple activation inputs being received at the cells of the firstcomputational array, receiving the multiple activation inputs from thefirst subset of the controllable bus lines; and loading the multipleactivation inputs from the first subset of the controllable bus lines inthe local memory.

In some implementations, the methods include: receiving instructionsfrom the first subset of the controllable bus lines; and loading theinstructions from the first subset of the controllable bus lines in thelocal memory.

In some implementations, the methods further include: receiving, at thetile, the multiple weight inputs, the multiple activation inputs, and/orinstructions, via the first subset of controllable bus lines, from acommunication interface of the ASIC.

In some implementations, the methods further include: receiving, at thetile, instructions, via the first subset of controllable bus lines, froma second tile encompasses an additional sub-array of the second largerarray of cells.

In some implementations, the methods further include: receiving, at thetile, from a second subset of the controllable bus lines, a firstpartial sum; adding, from the first computational array of cells, acomputational output to the first partial sum to obtain a second partialsum; and outputting the second partial sum to the second subset of thecontrollable bus lines. The second subset of the controllable bus linesmay extend to a second tile that encompasses an additional sub-array ofthe second larger array of cells. The methods may further includepassing the second partial sum from the second subset of thecontrollable bus lines to a vector processing unit.

Various implementations include one or more of the following advantages.For example, in some implementations, the tiles within the ASIC caninclude local memory allowing an increase in bandwidth. In someimplementations, one or more tiles of the ASIC can be configured asdedicated control tiles for handling writing and reading activation inother tiles within the ASIC. Providing dedicated control tiles may alsoincrease the bandwidth available in memory of other tiles within theASIC. In some implementations, the tiles of the ASIC can be configuredsuch that data skips at least one tile when transferring data betweentiles. Skipping at least one tile can reduce an overall data pathlength, and thus reduce latency associated with operations performed bythe ASIC.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features andadvantages will be apparent from the description, the drawings, and theclaims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic that illustrates an example of special purposelogic circuitry.

FIG. 2 is a schematic that illustrates an example of a tile for use inthe ASIC chip of FIG. 1 .

FIGS. 3A, 4A, 5A, 6A, 7, 8A and 9A are schematics that illustrate anoverview of a data flow through an ASIC at different times in anexemplary process implemented by the ASIC.

FIGS. 3B, 4B, 5B, 6B, 8B and 9B are schematics that illustrate detail ofdata flow within a single tile of an ASIC at the times associated withFIGS. 3A, 4A, 5A, 6A, 8A and 9A, respectively.

FIG. 10 is a schematic that illustrates an example of controllable buslines within a tile.

FIG. 11 is a schematic that illustrates an example of controllable buslines within a tile.

DETAILED DESCRIPTION

An application-specific integrated circuit (ASIC) is an integratedcircuit (IC) that is customized for a particular use. For example, anASIC may be designed to perform operations of machine learning modelsincluding, e.g., recognizing objects in images as part of deep neuralnetworks, machine translation, speech recognition, or other machinelearning algorithms. When used as an accelerator for a neural network,for instance, an ASIC can receive inputs to the neural network andcompute a neural network inference for the inputs. Data inputs to aneural network layer, e.g., either the input to the neural network orthe outputs of another layer of the neural network, can be referred toas activation inputs. The inferences can be computed in accordance withrespective sets of weight inputs associated with the layers of theneural network. For example, some or all of the layers may receive a setof activation inputs and process the activation inputs in accordancewith the set of weight inputs for the layer to generate outputs.

FIG. 1 is a schematic that illustrates an example of special purposelogic circuitry, in particular, an ASIC 100. The ASIC 100 includesmultiple tiles 102, in which one or more of the tiles 102 includesspecial purpose circuitry configured to perform operations, such ase.g., multiplication and addition operations. In particular, each tile102 can include a computational array of cells, in which each cell isconfigured to perform mathematical operations (see, e.g., the exemplarytile 200 shown in FIG. 2 , and described herein). In someimplementations, the tiles 102 are arranged in a grid pattern, withtiles 102 arranged along a first dimension 101 (e.g., rows) and along asecond dimension 103 (e.g., columns). For instance, in the example shownin FIG. 1 , the tiles 102 are divided into four different sections (110a, 110 b, 110 c, 110 d), each section containing 288 tiles arranged in agrid of 18 tiles down by 16 tiles across. In some implementations, theASIC 100 shown in FIG. 1 may be understood as including a singlesystolic array of cells subdivided/arranged into separate tiles, inwhich each tile includes a subset/sub-array of cells, local memory andbus lines (see, e.g., FIG. 2 ).

The ASIC 100 also includes a vector processing unit 104. The vectorprocessing unit 104 includes circuitry configured to receive outputsfrom the tiles 102 and compute vector computation output values based onthe outputs received from the tiles 102. For example, in someimplementations, the vector processing unit 104 includes circuitry(e.g., multiply circuitry, adder circuitry, shifters, and/or memory)configured to perform accumulation operations on the outputs receivedfrom the tiles 102. Alternatively, or in addition, the vector processingunit 104 includes circuitry configured to apply a non-linear function tothe outputs of the tiles 102. Alternatively, or in addition, the vectorprocessing unit 104 generates normalized values, pooled values, or both.The vector computation outputs of the vector processing units can bestored in one or more tiles. For example, the vector computation outputscan be stored in memory uniquely associated with a tile 102.Alternatively, or in addition, the vector computation outputs of thevector processing unit 104 can be transferred to a circuit external tothe ASIC 100, e.g., as an output of a computation. In someimplementations, the vector processing unit 104 is segmented, such thateach segment includes circuitry configured to receive outputs from acorresponding collection of tiles 102 and computes vector computationoutputs based on the received outputs. For instance, in the exampleshown in FIG. 1 , the vector processing unit 104 includes two rowsspanning along the first dimension 101, each of the rows including 32segments 106 arranged in 32 columns. Each segment 106 includes circuitry(e.g., multiply circuitry, adder circuitry, shifters, and/or memory)configured to perform a vector computation, as explained herein, basedon outputs (e.g., an accumulated sum) from a corresponding column oftiles 102. The vector processing unit 104 can be positioned in themiddle of the grid of tiles 102 as shown in FIG. 1 . Other positionalarrangements of the vector processing unit 104 are also possible.

The ASIC 100 also includes a communication interface 108 (e.g.,interfaces 108 a, 108 b). The communication interface 108 includes oneor more sets of serializer/deserializer (SerDes) interfaces and ageneral purpose input/output (GPIO) interface. The SerDes interface isconfigured to receive instructions (e.g., instructions for operatingcontrollable bus lines described below) and/or input data for the ASIC100 and to output data from the ASIC 100 to an external circuit. Forexample, the SerDes interface can be configured to transmit instructionsand/or input data at a rate of 32 Gbps, 56 Gbps, or any suitable datarate over the set of SerDes interfaces included within thecommunications interface 108. The GPIO interface is configured toprovide an interface for debugging and/or bootstrapping. For example,the ASIC 100 may run a boot program when it is turned on. If the programfails, an administrator may use the GPIO interface to debug the sourceof the failure.

The ASIC 100 further includes multiple controllable bus lines (see,e.g., FIG. 2 ) configured to convey data among the communicationsinterface 108, the vector processing unit 104, and the multiple tiles102. Controllable bus lines include, e.g., wires that extend along boththe first dimension 101 (e.g., rows) of the grid and the seconddimension 103 (e.g., columns) of the grid. A first subset of thecontrollable bus lines extending along the first dimension 101 can beconfigured to transfer data in a first direction (e.g., to the right ofFIG. 1 ). A second subset of the controllable bus lines extending alongthe first dimension 101 can be configured to transfer data in a seconddirection (e.g., to the left of FIG. 1 ). A first subset of thecontrollable bus lines extending along the second dimension 103 can beconfigured to transfer data in a third direction (e.g. to the top ofFIG. 1 ). A second subset of the controllable bus lines extending alongthe second dimension 103 can be configured to transfer data in a fourthdirection (e.g., to the bottom of FIG. 1 ).

Each controllable bus line includes multiple conveyer elements, such asflip-flops, that are used to convey data along the lines in accordancewith a clock signal. Transferring data over a controllable bus line caninclude shifting, at each clock cycle, data from a first conveyerelement of the controllable bus line to a second adjacent conveyerelement of the controllable bus line. In some implementations, data isconveyed over the controllable bus lines upon the rising or falling edgeof a clock cycle. For example, data present, at a first clock cycle, ona first conveyer element (e.g., a flip-flop) of a controllable bus linecan be transferred to a second conveyer element (e.g., a flip-flop) ofthe controllable bus line at a second clock cycle. In someimplementations, the conveyer elements can be periodically spaced apartat a fixed distance from one another. For example, in some cases, eachcontrollable bus line includes multiple conveyer elements, with eachconveyer element positioned within or proximate to a corresponding tile102.

Each controllable bus line also includes multiple multiplexers and/ordemultiplexers. A multiplexer/demultiplexer of a controllable bus lineis configured to transfer data between the bus line and a component ofthe ASIC chip 100. For example, a multiplexer/demultiplexer of acontrollable bus line can be configured to transfer data to and/or froma tile 102, to and/or from the vector processing unit 104, or to and/orfrom the communication interface 108. Transferring data among tiles 102,the vector processing unit 104, and the communication interface caninclude sending control signals to the multiplexers based on the desireddata transfer to take place. The control signals can be stored inregisters coupled directly to the multiplexer and/or demultiplexers. Thevalue of the control signal then may determine, e.g., what data istransferred from a source (e.g., memory within a tile 102 or a vectorprocessing unit 104) to a controllable bus line or, alternatively, whatdata is transferred from the controllable bus line to a sink (e.g.,memory within a tile 102 or a vector processing unit 104). Furtherdetails on controllable bus lines are described herein with respect toFIG. 10 .

The controllable bus lines are configured to be controlled on a locallevel, such that each tile, vector processing unit, and/or communicationinterface includes its own set of control elements for manipulating thecontrollable bus lines passing through that tile, vector processingunit, and/or communication interface. For example, each tile, 1D vectorprocessing unit, and communication interface may include a correspondingset of conveyer elements, multiplexers and/or demultiplexers forcontrolling data transfer to and from that tile, 1D vector processingunit, and communication interface.

To minimize latency associated with operations of the ASIC chip 100, thetiles 102 and vector processing unit 104 can be positioned to reduce thedistance data travels among the various components. In a particularimplementation, both the tiles 102 and communication interface 108 canbe segregated into multiple sections, with both the tile sections andthe communication interface sections being arranged such that themaximum distance data travels between a tile and a communicationinterface is reduced. For instance, in some implementations, a firstgroup of tiles 102 can be arranged in a first section on a first side ofthe communications interface 108, and a second group of tiles 102 can bearranged in a second section on a second side of the communicationinterface. As a result, the distance from a communication interface tothe furthest tile may be cut in half compared to a configuration inwhich all of the tiles 102 are arranged in a single section on one sideof the communication interface.

Alternatively, the tiles may be arranged in a different number ofsections, such as four sections. For instance, in the example shown inFIG. 1 , the multiple tiles 102 of ASIC 100 are arranged in multiplesections 110 (110 a, 110 b, 110 c, 110 d). Each section 110 includes asimilar number of tiles 102 arranged in a grid pattern (e.g., eachsection 110 can include 256 tiles arranged in 16 rows and 16 columns).The communication interface 108 also is divided into multiple sections:a first communication interface 108 a and a second communicationinterface 108 b arranged on either side of the sections 110 of tiles102. The first communication interface 108 a can be coupled, throughcontrollable bus lines, to the two tile sections 110 a, 110 c on theleft side of the ASIC chip 100. The second communication interface 108 bcan be coupled, through controllable bus lines, to the two tile sections110 b, 110 d on the right side of the ASIC chip 100. As a result, themaximum distance data travels (and thus the latency associated with thedata propagation) to and/or from a communication interface 108 can behalved compared to an arrangement in which only a single communicationinterface is available. Other coupling arrangements of the tiles 102 andcommunication interfaces 108 are also possible to reduce data latency.The coupling arrangement of the tiles 102 and communication interface108 can be programmed by providing control signals to the conveyerelements and multiplexers of the controllable bus lines.

In some implementations, one or more tiles 102 are configured toinitiate reading and writing operations with respect to controllable buslines and/or other tiles within the ASIC 100 (referred to herein as“control tiles”). The remaining tiles within the ASIC 100 can beconfigured to perform computations based on the input data (e.g., tocompute layer inferences). In some implementations, the control tilesinclude the same components and configuration as the other tiles withinthe ASIC 100. The control tiles can be added as an extra tile or tiles,an extra row or rows, or an extra column or columns of the ASIC 100. Forexample, for a symmetric grid of tiles 102, in which each tile 102 isconfigured to perform a computation on input data, one or moreadditional rows of control tiles can be included to handle reading andwriting operations for the tiles 102 performing computations on theinput data. For instance, each section 110 includes 18 rows of tiles,where the last two rows of tiles may include control tiles. Providingseparate control tiles increases, in some implementations, the amount ofmemory available in the other tiles used to perform the computations.Separate tiles dedicated to providing control as described herein arenot necessary, however, and in some cases, no separate control tiles areprovided. Rather, each tile may store in its local memory instructionsfor initiating reading and writing operations for that tile.

Furthermore, while each section 110 shown in FIG. 1 includes tilesarranged in 18 rows by 16 columns, the number of tiles 102 and theirarrangement in a section can be different. For example, in some cases,the sections 110 may include an equal number of rows and columns.

Furthermore, although shown in FIG. 1 as divided into four sections, thetiles 102 can be divided into other different groupings. For example, insome implementations, the tiles 102 are grouped into two differentsections, such as a first section above the vector processing unit 104(e.g., nearer the top of the page shown in FIG. 1 ) and a second sectionbelow the vector processing unit 104 (e.g., nearer to the bottom of thepage shown in FIG. 1 ). In such an arrangement, each section maycontain, e.g., 576 tiles arranged in a grid of 18 tiles down (alongdirection 103) by 32 tiles across (along direction 101). Sections maycontain other total numbers of tiles and may be arranged in differentsized arrays. In some cases, the divisions between sections aredelineated by hardware features of the ASIC 100. For example, as shownin FIG. 1 , sections 110 a, 110 b may be separated from sections 110 c,110 d by the vector processing unit 104.

Latency also may be reduced by centrally locating the vector processingunit 104 relative to the tile sections 110. In some implementations, afirst half of the tiles 102 are arranged on a first side of the vectorprocessing unit 104, and a second half of the tiles 102 are arranged ona second side of the vector processing unit 104.

For example, in the ASIC chip 100 shown in FIG. 1 , the vectorprocessing unit 104 includes two sections (e.g., two rows), each ofwhich includes a number of segments 106 that matches the number ofcolumns of tiles 102. Each segment 106 can be positioned and configuredto receive an output, such as an accumulated sum, from a correspondingcolumn of tiles 102 within a section 110 of tiles. In the example shownin FIG. 1 , the tile sections 110 a, 110 b positioned on a first side ofthe vector processing unit 104 (e.g., above the vector processing unit104) can be coupled, through controllable bus lines, to the top row ofsegments 106. The tile sections 110 c, 110 d positioned on a second sideof the vector processing unit 104 (e.g., below the vector processingunit 104) can be coupled, through controllable bus lines, to the bottomrow of segments 106. Furthermore, each tile 102 within the first halfabove the processing unit 104 can be positioned at a same distance fromthe vector processing unit 104 as a respective tile 102 within thesecond half below the processing unit 104, such that there is nodifference in overall latency between the two halves. For instance, thetiles 102 in row i in the first section 110 a (where the variable icorresponds to the row position) can be positioned at the same distanceaway from vector processing unit 104 as the tiles 102 in row m−1-i in asecond section of tiles (e.g., the section 110 c) (where m representsthe total number of rows in each section, and assuming rows areincremented along the same direction in both sections).

Configuring the tile sections 110 in this manner can halve the distancedata travels (and thus the latency associated with the data propagation)to and/or from the vector processing unit 104 compared to an arrangementin which the vector processing unit 104 is positioned at a far end(e.g., the bottom) of all the tiles 102. For instance, the latencyassociated with receiving an accumulated sum through a column of tiles102 from section 110 a can be half the latency associated with receivingan accumulated sum through a column of tiles 102 from sections 110 a and110 c. The coupling arrangements of the tiles 102 and the vectorprocessing unit 104 can be programmed by providing control signals tothe conveyer elements and multiplexers of the controllable bus lines.

During operation of the ASIC chip 100, activation inputs may be shiftedbetween tiles. For example, activation inputs can be shifted along thefirst dimension 101. In addition, outputs from computations performed bythe tiles 102 (e.g., outputs of computations performed by computationalarray within the tile 102) can be shifted along the second dimension 103between tiles.

In some implementations, the controllable bus lines can be physicallyhardwired to cause data to skip tiles 102 to reduce latency associatedwith the operations of the ASIC chip 100. For example, an output of acomputation performed by a first tile 102 can be shifted along thesecond dimension 103 of the grid to a second tile 102 positioned atleast one tile away from the first tile 102, thus skipping the tile inbetween. In another example, an activation input from a first tile 102can be shifted along the first dimension 101 of the grid to a secondtile 102 positioned at least one tile away from the first tile 102, thusskipping the tile in between. By skipping at least one tile whenshifting the activation input or the output data, the overall data pathlength can be reduced, such that the data is transferred faster (e.g.,there is no need to utilize a clock cycle to store data at the skippedtile), and latency is reduced.

In an example implementation, each tile 102 within each column ofsection 110 a can be configured, through the controllable bus lines, topass output data along the second dimension 103 toward the vectorprocessing unit 104. The tiles 102 within each column can be furtherconfigured to pass the data toward the vector processing unit 104 byskipping the next adjacent tile (e.g., through physical hardwiring ofthe controllable bus lines between tiles). That is, a tile 102 at aposition (i,j)=(0, 0) in the first section 110 a (where the variable icorresponds to the row position and the variable j corresponds to thecolumn position) can be hardwired to pass output data to a tile 102 at aposition (i,j)=(2, 0); similarly, the tile 102 at a position (i,j)=(2,0) in the first section 110 a can be hardwired to pass output data to atile 102 at a position (i,j)=(4, 0), and so forth. The last tile that isnot skipped (e.g., the tile 102 located at position (i,j)=(16, 0))passes output data to the vector processing unit 104. For a section 110having 18 rows of tiles, such as the example shown in FIG. 1 , the tileskipping ensure that all tiles within a section 110 are at most 9 “tilehops” away from the vector processing unit 104, thus improving the ASICchip 100 performance by reducing the data path length and resulting datalatency by half.

In another example implementation, each tile 102 within each row ofsections 110 a, 110 c and within each row of sections 110 b, 110 d canbe configured, through the controllable bus lines, to pass activationinputs along the first dimension 101. For example, some tiles within thesections 110 a, 110 b, 110 c, 110 d can be configured to pass activationinputs toward a center of the grid 100 or toward the communicationinterfaces 108. The tiles 102 within each row can be further configuredskip adjacent tiles, e.g., by hardwiring the controllable bus linesbetween tiles. For example, a tile 102 at a position (i,j)=(0, 0) in thefirst section 110 a (where the variable i corresponds to the rowposition and the variable j corresponds to the column position) can beconfigured to pass activation inputs to a tile 102 at a position(i,j)=(0, 2); similarly, a tile 102 at a position=(0, 2) in the firstsection 110 a can be configured to pass activation inputs to a tile 102at a position (i,j)=(0, 4), and so forth. In some cases, the last tilethat is not skipped (e.g., the tile 102 located at position (i,j)=(0,14)) does not pass the activation input on to another tile.

Similarly, tiles that are skipped may pass activation inputs in theopposite direction. For example, a tile 102 at a position (i,j)=(0, 15)in the first section 110 a (where the variable i corresponds to the rowposition and the variable j corresponds to the column position) can beconfigured to activation inputs to a tile 102 at a position (i,j)=(0,13); similarly, a tile 102 at a position (i,j)=(0, 13) in the firstsection 110 a can be configured to pass activation inputs to a tile 102at a position (i,j)=(0, 11), and so forth. In some cases, the last tilethat is not skipped (e.g., the tile 102 located at position (i,j)=(0,1)) does not pass the activation input on to another tile. By skippingtiles, it is possible, in some implementations, to improve the ASIC chip100 performance by reducing the data path length and resulting datalatency by half.

As explained herein, in some implementations, one or more of the tiles102 are dedicated to storing control information. That is, the tiles 102dedicated to storing control information do not take part in performingcalculations on input data such as weight inputs and activation inputs.Control information can include, e.g., control data for configuring thecontrollable bus lines during operation of the ASIC chip 100 so thatdata can be moved around the ASIC chip 100. The control data can beprovided to the controllable bus lines in the form of control signalsfor controlling the conveyer elements and multiplexers of thecontrollable bus lines. The control data specifies whether particularconveyer elements of the controllable bus lines pass data to a nextconveyer element of the controllable bus line so that data istransferred among the tiles according to a predetermined schedule. Thecontrol data additionally specifies whether data is transferred from orto a bus line. For example, the control data can include control signalsthat direct a multiplexer to transfer data from a bus line to memoryand/or other circuitry within a tile. In another example, the controldata can include control signals that direct a multiplexer to transferdata from the memory and/or circuitry within the tile to the bus line.In another example, the control data can include control signals thatdirect a multiplexer to transfer data between a bus line and thecommunications interface 108 and/or between the bus line and the vectorprocessing unit 104. Alternatively, as disclosed herein, dedicatedcontrol tiles are not used. Rather, in such cases, the local memory ofeach tile stores the control information for that particular tile.

A schematic illustrating an example of a tile 200 for use in the ASICchip 100 is shown in FIG. 2 . Each tile 200 includes local memory 202and a computational array 204 coupled to the memory 202. The localmemory 202 includes physical memory positioned proximate to thecomputational array 204. The computational array 204 includes multiplecells 206. Each cell 206 of the computational array 204 includescircuitry configured to perform a computation (e.g., a multiply andaccumulate operation) based on data inputs, such as activation inputsand weight inputs, to the cell 206. Each cell can perform thecomputation (e.g., the multiply and accumulation operation) on a cycleof the clock signal. The computational array 204 can have more rows thancolumns, more columns than rows, or an equal number of columns and rows.For instance, in the example shown in FIG. 2 , the computational array204 includes 64 cells arranged in 8 rows and 8 columns. Othercomputational array sizes are also possible, such as computationalarrays having 16 cells, 32 cells, 128 cells, or 256 cells, among others.Each tile can include the same number of cells and/or the same sizecomputational array. The total number of operations that can beperformed in parallel for the ASIC chip then depends on the total numberof tiles having the same size computational array within the chip. Forexample, for the ASIC chip 100 shown in FIG. 1 , which containsapproximately 1150 tiles, this means that approximately 72,000computations can be performed in parallel every cycle. Examples of clockspeeds that may be used include, but are not limited to, 225 MHz, 500MHz, 750 MHz, 1 GHz, 1.25 GHz, 1.5 GHz, 1.75 GHz, or 2 GHz. Thecomputational arrays 204 of each individual tile is a subset of thelarger systolic array of tiles, as illustrated in FIG. 1 .

The memory 202 contained in the tile 200 can include, e.g.,random-access memory (RAM), such as SRAM. Other memory can be usedinstead. Each memory 202 can be configured to store (1/n)^(th) of thetotal memory associated with n tiles 102 of the ASIC chip. The memory202 can provided as a single chip or in multiple chips. For example,memory 202 shown in FIG. 2 is provided as four single-port SRAMs, eachof which is coupled to the computational array 204. Alternatively, thememory 202 can be provided as two single-port SRAMs or eight single-portSRAMS, among other configurations. The joint capacity of the memory canbe, but is not limited to, e.g., 16 kB, 32 kB, 64 kB, or 128 kB, aftererror correction coding. By providing the physical memory 202 locally tothe computational arrays, the density of wiring for the ASIC 100 can be,in some implementations, vastly reduced. In an alternate configurationin which memory is centralized within the ASIC 100, as opposed toprovided locally as described herein, may require a wire for each bit ofmemory bandwidth. The total number of wires needed to cover each tile ofthe ASIC 100 would far exceed the available space within the ASIC 100.In contrast, with dedicated memory provided for each tile, the totalnumber of required to span the area of the ASIC 100 can be substantiallyreduced.

The tile 200 also includes controllable bus lines. The controllable buslines may be categorized into multiple different groups. For example,the controllable bus lines can include a first group of general purposecontrollable bus lines 210 configured to transfer data among tiles ineach cardinal direction. That is, the first group of controllable buslines 210 can include: bus lines 210 a configured to transfer datatoward a first direction along the first dimension 101 of the grid oftiles (referred to as “East” in FIG. 2 ); bus lines 210 b configured totransfer data toward a second direction along the first dimension 101 ofthe grid of tiles (referred to as “West” in FIG. 2 ), in which thesecond direction is opposite to that of the first direction; bus lines210 c configured to transfer data toward a third direction along thesecond dimension 103 of the grid of tiles (referred to as “North” inFIG. 2 ); and bus lines 210 d configured to transfer data toward afourth direction along the second dimension 103 of the grid of tiles(referred to as “South” in FIG. 2 ), in which the fourth direction isopposite to the third direction. General purpose bus lines 210 can beconfigured to carry control data, activation input data, data fromand/or to the communications interface, data from and/or to the vectorprocessing unit, and data to be stored and/or used by the tile 200(e.g., weight inputs). The tile 200 may include one or more controlelements 221 (e.g., flip-flops and multiplexers) for controlling thecontrollable bus lines, and thus routing data to and/or from the tile200 and/or from memory 202.

The controllable bus lines also can include a second group ofcontrollable bus lines, referred to herein as computational arraypartial sum bus lines 220. The computational array partial sum bus lines220 can be configured to carry data output from computations performedby the computational array 204. For example, the bus lines 220 can beconfigured to carry partial sum data obtained from the rows in thecomputational array 204, as shown in FIG. 2 . In such case, the numberof bus lines 220 would match the number of rows in the array 204. Forinstance, for a 8×8 computational array, there would be 8 partial sumbus lines 220, each of which is coupled to the output of a correspondingrow in the computational array 204. The computational array output buslines 220 can be further configured to couple to another tile within theASIC chip, e.g., as inputs to a computational array of another tilewithin the ASIC chip. For example, the array partial sum bus lines 220of tile 200 can be configured to receive inputs (e.g., partial sums 220a) of a computational array of a second tile that is located at leastone tile away from the tile 200. The outputs of computational array 204then are added to the partial sum lines 220 to produce new partial sums220 b, which may be output from the tile 200. The partial sums 220 bthen may be passed to another tile or, alternatively, to the vectorprocessing unit. For example, each bus line 220 may be coupled to acorresponding segment (such as segments 106 in FIG. 1 ) of the vectorprocessing unit.

As explained with respect to FIG. 1 , the controllable bus lines caninclude circuitry such as conveyer elements (e.g., flip-flops)configured to allow data to be conveyed along the bus lines. In someimplementations, each controllable bus line includes, for each tile, acorresponding conveyer element. As further explained with respect toFIG. 1 , the controllable bus lines can include circuitry such asmultiplexers configured to allow data to be transferred among thedifferent tiles, the vector processing unit and the communicationsinterface of the ASIC chip. The multiplexers can be located whereverthere is a source or sink for data. For example, in someimplementations, as shown in FIG. 2 , control circuitry 221, such asmultiplexers, can be located at crossings of controllable bus line(e.g., at the crossing of general purpose bus lines 210 a and 210 d, atthe crossing of general purpose bus lines 210 a and 210 c, at thecrossing of general purpose bus lines 210 b and 210 d, and/or at thecrossing of general purpose bus lines 210 b and 210 c). The multiplexersat the bus line crossings can be configured to transfer data between thebus lines at the crossings. Accordingly, by proper operation of themultiplexers, it can be possible to change the direction in which datatravels over the controllable bus lines. For example, data travelingalong the first dimension 101 on general purpose bus lines 210 a can betransferred to general purpose bus lines 210 d, such that the datainstead travels along the second dimension 103. In some implementations,multiplexers can be located adjacent to the memory 202 of the tile 200so that data can be transferred to and/or from memory 202.

FIGS. 3A-9B are schematics that illustrate an example process in whichthe ASIC 100 is used as a hardware accelerator for computing neuralnetwork inferences. FIGS. 3A, 4A, 5A, 6A, 7, 8A and 9A are schematicsthat illustrate an overview of data flow through the ASIC 100 atdifferent times in the process. FIGS. 3B, 4B, 5B, 6B, 8B and 9B areschematics that illustrate data flow within a single tile (e.g., acontrol tile or other tile 102) of the ASIC 100 at the times associatedwith FIGS. 3A, 4A, 5A, 6A, 8A and 9A, respectively. The ellipses inFIGS. 3A-9B indicate the presence of repeating features that are notshown in the figures. A compass 300 is provided in each of FIGS. 3A-9Bto provide orientation for data flow. The labels “N,” “W,” “S” and “E”do not correspond to actual geographic directions, but instead are usedto indicate different relative directions in which data can flow throughthe grid. Controllable bus lines conveying data in the directionsindicated by the labels “N,” “W,” “S” and “E” are referred to herein asnorth-flowing bus lines, west-flowing bus lines, south-flowing buslines, and east-flowing bus lines.

The arrangement of tiles 102 and vector processing unit 104 in FIGS.3A-9A is similar to the arrangement shown in FIG. 1 . For example, halfof the tiles 102 can be arranged on a first side of the vectorprocessing unit 104 and the other half of tiles 102 can be arranged on asecond opposite side of the vector processing unit 104. Thecommunication interfaces 108 are shown in FIGS. 3A-9A as arranged onentirely on the right side of the tile grid, but can be positioned oneither side of the tile grid as depicted in the schematic of FIG. 1 .

In a first step, as shown in FIG. 3A, input values (e.g., activationinputs and/or weight inputs) for a first layer of a model (e.g., aneural network model) are loaded from the communication interfaces 108onto one or more tiles 102 (e.g., all of the tiles 102) within the ASIC100. In some implementations, one or more the tiles 102 onto which theinput values are loaded also can be dedicated to storing controlinformation and/or output information from the vector processing unit104. Such tiles may be referred to herein as “control tiles.” Controltiles include tiles 102 of the ASIC 100 that are configured to provideprograms, also referred to as control instructions (e.g., instructionsto perform read and/or write operations with respect to the controllablebus lines) to other tiles 102. The programs/control instructions may bereceived in a tile 102 (a control tile or any tile in the ASIC asdescribed herein) from a circuit element external to the tile, such asthe communication interface. The input values provided to the one ormore control tiles can include, e.g., weight inputs and/or activationinputs for a neural network layer and is represented as dots 301 inFIGS. 3A-3B. In some implementations, the one or more control tiles arepositioned directly adjacent to the vector processing unit 104. Bypositioning the one or more control tiles directly adjacent to thevector processing unit 104, the data path length required for outputdata to pass from the vector processing unit 104 to the one or morecontrol tiles can be reduced (e.g., in cases where the one or morecontrol tiles are configured to store output data from the vectorprocessing unit 104).

The remaining tiles 102 within the ASIC 100 can be configured to performcomputations based on input data (e.g., weight inputs and activationinputs) received from the control tiles, communication interface 108,and/or vector processing unit 104. In some implementations, such asshown in the examples of FIGS. 3A-9B, control tiles and the remainingtiles 102 of the ASIC 100 include the same components and configuration.

From the communications interfaces 108, the input values follow a datapath along the controllable bus lines (e.g., such as the general purposecontrollable bus lines described herein) to the one or more controltiles. The data can be transferred between different bus lines throughthe use of multiplexers at locations where the different bus lines cross(e.g., see routing element 221 in FIG. 2 ). For example, as shown inFIG. 3A, the input data flows along a data path that entails travelingon west-flowing general purpose controllable bus lines and then onsouth-flowing general purpose controllable bus lines. The input data canbe transferred from the west-flowing bus lines to the south-flowing buslines through the use of multiplexers at locations where thewest-flowing bus lines and south-flowing bus lines cross. In someimplementations, the weight inputs for a second inference can be loadedto the one or more control tiles while a previous first inference isbeing executed by the ASIC 100.

FIG. 3B is a schematic that illustrates a detailed view of an example ofa tile 102, from the ASIC 100. As shown in FIG. 3B, the tile 102 caninclude memory 302 on which the input values are stored. Memory 302 caninclude any suitable memory as described herein with respect to FIG. 2 .The input values are obtained from one or more south-flowing generalpurpose controllable bus lines 310 d that pass adjacent to or throughthe tile 102. The data from the south-flowing controllable bus lines 310d can be transferred to the memory 302 through the use of a multiplexer.Other general purpose controllable bus lines (310 a, 310 b, 310 c) arenot used during this step.

Tile 102 also includes a computational array of cells 306 directlycoupled to memory 302. As explained herein, the computational array ofcells 306 may be a subset of a larger systolic array of cells that makesup the tiles of the ASIC. The cells 306 are arranged in an array, with asingle cell 306 shown in FIG. 3B at a position (i,j)=(0, 0), where theparameter i represents a cell row position within the array and jrepresents a cell column position in the array. In the example shown inFIG. 3B, the computational array has 8 rows and 8 columns, though othersizes also are possible. Each cell 306 of the computational array caninclude circuitry configured to perform computations based on datareceived at the tile. For example, each cell 306 can include multipliercircuitry, adder circuitry, and one or more registers. The output ofeach cell 306 can be passed as a partial sum to an adjacent cell withinthe computational array or to a cell within a computational array ofanother tile in the ASIC 100. The computational array of cells 306 isused in later steps.

The tile 102 also includes controllable bus lines 320 for providing datafrom previous tiles. For example, the controllable bus lines 320 cancarry partial sum output data obtained from a computational array of aprevious tile in the ASIC 100 and provide the partial sum output data asan input to the cells of the computational array within tile 102.Controllable bus lines 320 are not used in this step.

The tile 102 also includes controllable bus lines 330 for providingactivation input values as an input to the cells 306 of thecomputational array. For example, the activation input values can beprovided to multiplier circuitry within the cell 306. The activationinput values can be obtained from the communications interface 108 orfrom cells within another tile in the ASIC 100. The data from thecontrollable bus lines 330 can be transferred to the cells 306 throughthe use of a multiplexer. Controllable bus lines 330 are not used in theexample step depicted in FIGS. 3A-3B.

As explained herein, in some implementations, one or more tiles 102 arededicated to storing control information and/or output information fromthe vector processing unit 104. In some implementations, thecomputational arrays within the one or more control tiles may not beused to perform computations. Alternatively, the one or more controltiles can be configured to store control data in addition to performingcomputations on input data, such as received weight inputs andactivation values. In some implementations, the weight inputs are loadedinto the memory of each tile 102 where the weight inputs will be used,without first storing the weight inputs in a subset of one or morecontrol tiles.

In a second step, as shown in FIG. 4A, weight inputs 301 are loaded intothe individual cells 306 of the computational arrays within the tiles102. Loading the weight inputs 301 into the individual cells 306 caninclude transferring the data from the memory of one or more controltiles to the corresponding tiles 102 in which the weight inputs 301belong. The weight inputs 301 can be conveyed along the general purposecontrollable bus lines to the tiles 102 and transferred to the memorythrough multiplexers coupled to the bus lines and memory. FIG. 4B is adetailed view of an example of a tile 102. The weight inputs 301 can bestored in the memory 302 for the duration of the model execution, whichmay include computation of multiple inferences. As an alternative toloading the weight inputs 301 from the one or more control tiles, theweight inputs 301 may have been pre-loaded into the memory of tiles 102directly from the communication interfaces 108. To prepare a model forexecution, the weight inputs 301, for each tile 102, can be loaded fromthe memory 302 of the tile 102 into each cell 306 of the computationalarray within that tile 102. For example, the weight inputs 301 can beloaded into a register 400 (also referred to as a “back register”)within the cell 306. The use of back registers allows a computation tobe performed by the cell 306 on a current weight input while a nextweight input is loaded into the back register. Although loading weightregisters is shown for only one cell 306 in FIG. 4B, weight registers ofother cells within the computational array also can be loaded duringthis step.

In a third step, as shown in FIG. 5A, activation values 500 areintroduced into the tiles 102 and may be stored within memory 302 there.The activation values 500 can be transferred over multiple clock cycles.Computations then are performed by the computational arrays of each tile102 with the received activation values 500 and the weight inputs 301from the memory 302 in the tile 102. For example, the computation caninclude multiplying an activation value by a weight input and thensumming the result with the product of a different weight input andactivation value. In some implementations, the activation values 500 areconveyed to and between tiles 102 on controllable bus lines 330. Each ofthe controllable bus lines 330 can extend along a same direction. Forexample, as shown in FIG. 5B, the controllable bus lines 330 extendlaterally along a grid dimension that is orthogonal to a grid dimensionalong which controllable bus lines 320 extend. Furthermore, as indicatedby the arrows 501 in FIG. 5A, and the arrows 501 on controllable buslines 330 in FIG. 5B, the activation input data 500 travels on the buslines 330 in the same (e.g., east-flowing) direction. Alternatively, insome implementations, some of the activation input values 500 travel onsome of the controllable bus lines 330 in a first direction (e.g.,east-flowing direction) and some other activation input values 500travel on some other controllable bus lines 330 in a second oppositedirection (e.g., west-flowing direction). In some implementations, theactivation input data 500 is conveyed along the controllable bus lines330 such that at least one tile 102 is skipped. For instance, activationinput data 500 may be provided to a first tile in a first row of tilesin the ASIC, and then conveyed from the first tile to a second tile inthe first row in which the second tile is located at least one tile awayfrom the first tile.

In some implementations, the number of controllable bus lines 330 thatextend through each tile 102 is determined by the size of thecomputational array. For example, the number of controllable bus lines330 that extend through each tile 102 may be equal to at least thenumber of rows of cells within the computational array. In the exampleshown in FIG. 5B, there are 8 controllable bus lines 330 that passthrough tile 102 given that there are 8 rows of cells 306 within thecomputational array of tile 102. In some implementations, each separatecontrollable bus line 330 transfers activation input values 500 to thecells 306 within a corresponding row of the computational array. Forinstance, for an 8×8 computational array of cells 306 within a tile 102,a first controllable bus line 330 transfers activation input values 500to the cells 306 within a first row of the array, a second controllablebus line 330 transfers activation input values 500 to the cells 306within a second row of the array, etc., up to the last controllable busline 330, which transfers activation input values 500 to the cells 306within the last row of the array. Additional controllable bus lines(e.g., partial sum bus lines) may pass through each tile to providepartial sums from another tile, to receive and combine results ofcomputations within the tile to the provided partial sums, and to outputthe new partial sums to a new tile or to the vector processing unit.

In some implementations, the controllable bus lines 330 transfer theactivation input values 500 to circuitry configured to perform acomputation within the cell 306. For example, as shown in FIG. 5B, thecontrollable bus lines 330 are configured to transfer activation inputvalues 500 to multiplier circuit 502 within the cell 306. The activationinput values 500 can be transferred to the multiplier circuit 502through the use of multiplexers on the controllable bus lines 330.

In some implementations, once the activation input values 500 and weightinput values 301 are determined to be in place (e.g., by inspectingcontrol signals), the cells 306 of the computational array within thetile 102 perform a computation using the received activation inputvalues 500 and the weight input values 301 from the memory 302 in thetile 102. For example, as shown in FIG. 5B, the weight input values 301that were previously stored in register 400 are transferred to register504 (also referred to as a “front register”). Then, using the multipliercircuit 502, the weight input values 301 are multiplied with thereceived activation input values 500.

As explained herein, the activation input values 500 are conveyed oncontrollable bus lines 330. In some implementations, the controllablebus lines 330 are general purpose controllable bus lines. In someimplementations, the controllable bus lines 330 can be dedicated toproviding activation inputs. For example, as shown in FIG. 5B,activation input values can be provided to a tile 102 (e.g., to thecells 306 of a computational array within the tile 102) by lines 330,whereas other general purpose controllable bus lines 310 b can be usedto provide other data and/or instructions to the tile 102.

In a fourth step, as shown in FIG. 6B, a result of a computation betweenthe weight input values 301 and the activation input values 500, withineach cell 306, is passed to circuitry 602 within the cell 306 to producean output value 600. In the example of FIG. 6B, the circuitry 602includes a summation circuit. The summation circuit 602 within each cell306 is configured to sum the product of the multiplier circuit 502 withanother value obtained from either another tile 102 in the ASIC 100 orfrom another cell 306 within the computational array. The value obtainedfrom another tile 102 or from another cell 306 can include, e.g., anaccumulated value. Accordingly, the output value 600 of the summationcircuit 602 is a new accumulated value. The summation circuit 602 thencan send the new accumulated value 600 to another cell located in abottom (e.g., in a south-flowing direction) adjacent cell of thecomputational array within the tile 102. The new accumulated value 600can be used as an operand for a summation in the bottom adjacent cell.For the last row of cells within the computational array, the newaccumulated values 600 can be transferred to another tile 102 within theASIC 100, as shown in FIG. 6A. In another example, the new accumulatedvalues 600 can be transferred to another tile 102 that is at least onetile away from the tile 102 in which the new accumulated values 600 weregenerated. Alternatively, as also shown in FIG. 6A, the new accumulatedvalues 600 from the last row of cells within the computational array aretransferred to the vector processing unit 104.

The accumulated values 600 that are transferred into a tile 102 ortransferred out of a tile 102 can be conveyed along controllable buslines 320. Each of the controllable bus lines 320 extend along a samedirection. For example, as shown in FIG. 6B, the controllable bus lines320 extend vertically along a grid dimension that is orthogonal to agrid dimension along which controllable bus lines 330 extend.Furthermore, as indicated by the arrows 604 in FIG. 6A, and the arrows604 in FIG. 6B, the accumulated values 600 travel on the controllablebus lines 320 in either a north-flowing or south-flowing directiondepending on the location of the vector processing unit 104 relative tothe tiles 102 from which the accumulated values 600 are generated. Forexample, for the tiles 102 located above the vector processing unit 104in FIG. 6A, the accumulated values 600 travel on the controllable buslines 320 in a south-flowing direction towards the vector processingunit 104, whereas for the tiles 102 located below the vector processingunit 104, the accumulated values 600 travel in a north-flowing directiontowards the vector processing unit 104.

In some implementations, the number of controllable bus lines 320 thatprovide accumulated values entering a tile 102 is determined by the sizeof the computational array. For example, the number of controllable buslines 320 that provide accumulated values entering a tile 102 equals thenumber of columns of cells within the computational array. In theexample shown in FIG. 6B, there are 8 controllable bus lines 320entering tile 102 given that there are 8 columns of cells 306 within thecomputational array of tile 102. In some implementations, each separatecontrollable bus line 320 that enters the tile 102 transfers anaccumulated value 600 to a different corresponding cell 306 in the firstrow of cells of the computational array. As explained herein, theaccumulated value 600 received in each cell then is used as an operandto produce a new accumulated value, which is passed to an adjacent cellwithin the array.

Similarly, in some implementations, the number of controllable bus lines320 that provide accumulated values exiting a tile 102 also isdetermined by the size of the computational array. For example, thenumber of controllable bus lines 320 that provide accumulated valuesexiting a tile 102 equals the number of columns of cells within thecomputational array. For instance, each separate controllable bus line320 transfers a new accumulated value 600 from a different correspondingcell 306 in a last row of cells of the computational array to eitheranother tile 102 within the ASIC 100 or to the vector processing unit104.

In a fifth step as shown in FIG. 7 , the data (e.g., the accumulatedvalues) received by the vector processing unit 104 are processed by thevector processing unit 104 to provide processed values 700. Processingof the data at the vector processing unit 104 can include applying abias to the data received at the vector processing unit 104, performingadditional accumulation operations, and/or applying a non-linearfunction (e.g., a rectifier function or sigmoid function as known inneural network systems) to the received data. Other operations also canbe applied by the vector processing unit 104. The vector processing unit104 can include circuitry arranged in multiple segments 106, in whicheach segment 106 is configured to process data received from acorresponding column of tiles 102 and generate a corresponding processedvalue 700.

In a sixth step, as shown in FIG. 8A, the processed values 700 from thevector processing unit 104 are transferred to and stored in one or moretiles of the ASIC 100, e.g., a subset of the tiles of the ASIC 100. Forexample, the processed values 700 can be sent to the control tiles 103,which are located directly adjacent to the vector processing unit 104.Alternatively, or in addition, the processed values 700 can be sent toone or more of the other tiles 102 within the ASIC 100. The processedvalues 700 can be transferred to one or more tiles over a generalpurpose controllable bus line, such as controllable bus lines 310 c.Upon reaching a tile (e.g., a control tile or other tile 102), theprocessed values 700 can be stored in the memory 202 of the tile. Forexample, the processed values 700 can be transferred to the memory 702using a multiplexer associated with the controllable bus line 310 c. Thestep of storing the processed values 700 can occur after the inferencesof each model layer are obtained. In some implementations, the processedvalues 700 can be provided as input values to a next layer of the model.

In a seventh step, as shown in FIGS. 9A and 9B, the processed values 700can be exported off the ASIC 100. For example, the processed values 700can be transferred from the memory 202 of the one or more control tilesto the communications interface 108. The processed values 700 can beconveyed to the communications interface 108 on controllable bus lines(e.g., controllable bus lines 310 c and/or 310 d). The processed values700 can be transferred to the controllable bus lines throughmultiplexers associated with the bus lines.

The processed values 700 may be exported off the ASIC 100, e.g., if theinferences for a final layer of a model have been obtained or if themodel has been partitioned among multiple ASICs and the inferences forthe final layer associated with ASIC 100 have been obtained. Theprocessed values 700 can be received and exported by the SerDesinterfaces of the communications interface 108 to another destinationincluding, but not limited to, e.g., another ASIC 100 or afield-programmable gate array chip.

FIG. 10 is a schematic that illustrates an example of controllable buslines within a tile 102, such as a tile 102 from ASIC 100 shown in FIG.1 . Four controllable bus lines 1010 a, 1010 b, 1010 c, and 1010 d aredepicted in FIG. 10 , each of which is configured to direct data along adifferent direction (e.g., an east-flowing direction, a west-flowingdirection, a north-flowing direction, and a south-flowing direction, inaccordance with compass 300), as explained herein with respect to FIGS.2-9B. Although only four controllable bus lines are shown in FIG. 10 ,additional controllable bus lines can be added as needed. For example,the tile 102 can include multiple north-flowing bus lines, multiplesouth-flowing bus lines, multiple east-flowing bus lines, and/ormultiple west-flowing bus lines. In some implementations, the bus linesextend into and across multiple tiles.

The tile 102 shown in FIG. 10 further includes local memory 1002 that isproximate to cells 1006 from a computational array within the tile 102.For ease of viewing, only a single cell 1006 is shown in FIG. 10 ,though more cells 1006 are included within the tile 102 (e.g., in acomputational array, such as array 204 shown in FIG. 2 ). The localmemory 1002 is coupled to one or more cells 1006 of the computationalarray.

The controllable bus lines 1010 a-1010 d can include, e.g., generalpurpose controllable bus lines that carry data among the tiles 102 ofthe ASIC 100, the vector processing unit (e.g., vector processing unit104), and the communications interface (e.g., communications interface108). The data carried by the general purpose controllable bus lines canincluded, e.g., weight input data, activation input data, and/orprograms (e.g., control instructions for operating the controllable buslines).

The controllable bus lines 1010 a-1010 d in tile 102 shown in FIG. 10are coupled to a multiplexer circuit 1020. The multiplexer 1020 allowsdata to be selected from one of the multiple controllable bus lines 1010a-1010 d and then transferred to the local memory 1002. The particularcontrollable bus line 1010 a-1010 d from which data is transferred tothe local memory 1002 is determined by an input select signal receivedat an input select port 1022 of the multiplexer 1020. For instance, ifan input select signal received at input select port 1022 is “00,” themultiplexer 1020 can output data from the east-flowing controllable busline 1010 a at the multiplexer output port 1024. Alternatively, inanother example, if the input select signal received at the input selectport 1022 is “11,” the multiplexer 1020 can output data from thesouth-flowing controllable bus line 1010 d. The input select signal canbe stored locally at the tile 102 in a multiplexer input select register1026. The input select control signal can be transferred to the inputselect register 1026 from a control tile of the ASIC 100, e.g., from alocal memory of a control tile of the ASIC 100.

The output of the multiplexer 1020 is provided to the local memory 1002of the tile 102 shown in FIG. 10 . The output can include, e.g., weightinput data. The weight input data can be stored in local memory 1002 andtransferred to one or more cells 1006 of the computational array of thetile 102 at a later time.

As explained herein, data can be conveyed along the controllable buslines in accordance with a clock cycle. In particular, each controllablebus line can include a conveyer element 1030 configured to pass dataalong the bus line. The conveyer element 1030 can include, e.g., acircuit configured to receive data from a portion of the bus line, storethe received data, and re-transmit the stored data along the bus line,e.g., in accordance with a clock signal received at the conveyer element1030.

The conveyer elements 1030 can include circuits, such as flip-flops,that are used to convey data along the lines in accordance with a clocksignal. Transferring data over a controllable bus line can includeshifting, at each clock cycle, data from a first conveyer element of thecontrollable bus line to a second adjacent conveyer element of thecontrollable bus line. In some implementations, data is conveyed overthe controllable bus lines upon the rising or falling edge of a clockcycle. For example, data present, at a first clock cycle, on a firstconveyer element (e.g., a flip-flop) of a controllable bus line can betransferred to a second conveyer element (e.g., a flip-flop) of thecontrollable bus line at a second clock cycle.

An advantage of including at least one conveyer element 1030 on a busline is that the conveyer element 1030 allows the distance that datatravels along the bus line to be increased. For instance, for a wire busline without any conveyer elements 1030, the maximum distance that datacan travel along the bus line within one clock cycle is limited by thedrift speed of the electrons within the wire. Since this maximumdistance may be less than the entire length or width of an ASIC 100, itis not possible to use the wire, alone, for transmitting data across thefull span of the ASIC 100 within a single clock cycle. However, byincluding one or more conveyer elements 1030 on the bus line, the datathen can be conveyed across bus line from one conveyer element to thenext at each clock cycle.

As shown in the example, each controllable bus line 1010 a-1010 d withinthe tile 1020 includes a corresponding conveyer element 1030. Thoughonly a single conveyer element 1030 per bus line is shown in FIG. 10 ,each controllable bus line can include multiple conveyer elements 1030.For example, the conveyer elements 1030 can be periodically spaced apartat fixed distances from one another across the entire length of acontrollable bus line within the ASIC 100. Accordingly, in someimplementations, a conveyer element 1030 may not be located at each tile102 of the ASIC 100. Rather, for example, the conveyer elements 1030 ona particular controllable bus line can be separated from one another bya distance equivalent to two, three, four or more tiles of the ASIC 100.

In some implementations, multiplexers can be used to transfer data fromone controllable bus line to another different controllable bus line.FIG. 11 is a schematic that illustrates an example of controllable buslines within a tile 102, such as a tile 102 from ASIC 100 shown in FIG.1 . Again, four controllable bus lines 1110 a, 1110 b, 1110 c, and 1110d are depicted in FIG. 11 , each of which is configured to direct dataalong a different direction (e.g., an east-flowing direction, awest-flowing direction, a north-flowing direction, and a south-flowingdirection, in accordance with compass 300), as explained herein withrespect to FIGS. 2-9B. Although only four controllable bus lines areshown in FIG. 11 , additional controllable bus lines can be added asneeded. For example, the tile 102 can include multiple north-flowing buslines, multiple south-flowing bus lines, multiple east-flowing buslines, and/or multiple west-flowing bus lines. Additionally, though onlya portion of the bus lines are depicted in FIG. 11 for ease of viewing,the bus lines can extend over the entire width or length of the tile,e.g., the bus lines can extend across multiple tiles. Additionally, thelocal memory, computational array and other multiplexers are not shownin FIG. 11 for ease of viewing.

The controllable bus lines 1110 a-1110 d can include, e.g., generalpurpose controllable bus lines that carry data among the tiles 102 ofthe ASIC 100, the vector processing unit (e.g., vector processing unit104), and the communications interface (e.g., communications interface108). The data carried by the general purpose controllable bus lines canincluded, e.g., weight input data.

In the example of FIG. 11 , multiplexer 1120 is coupled to thecontrollable bus lines 1110 a-1110 d to allow a transfer of data fromone of controllable bus lines 1110 b-1110 d to line 1110 a. Inparticular, each input of the multiplexer 1120 is coupled to a differentcontrollable bus line (e.g., the four inputs are coupled to bus line1110 a, 1110 b, 1110 c, and 1110 d, respectively). With theconfiguration of the bus lines and multiplexer 1120 shown in FIG. 11 ,it is possible to transfer data from one of controllable bus lines 1110b-1110 d to controllable bus line 1110 a or to maintain, withoutalteration, the data that is on line 1110 a.

The particular controllable bus line 1110 b-1110 d from which data istransferred to the line 1110 a is determined by an input select signalreceived at an input select port 1122 of the multiplexer 1120. Forinstance, if an input select signal received at input select port 1122is “00,” the multiplexer 1120 can transfer data from the south-flowingcontrollable bus line 1110 d onto line 1110 a at the multiplexer outputport 1124. Alternatively, in another example, if the input select signalreceived at the input select port 1122 is “01,” the multiplexer 1120 cantransfer data from the north-flowing controllable bus line 1110 c ontoline 1110 a at the multiplexer output port 1124. Alternatively, inanother example, if the input select signal received at the input selectport 1122 is “11,” the multiplexer 1120 can maintain data from theeast-flowing controllable bus line 1110 a at the input port of themultiplexer 1120 on the line 1110 a at the multiplexer output port 1124.

The input select signal can be stored locally at the tile 102 in amultiplexer input select register 1126. The input select control signalcan be transferred to the input select register 1126 from a control tileof the ASIC 100, e.g., from a local memory of a control tile of the ASIC100.

In some implementations, the controllable bus lines are coupled to ademultiplexer within the tile 102. For example, in some implementations,data may need to be offloaded from the local memory onto one of thecontrollable bus lines. In such case, the local memory is coupled to aninput port of the demultiplexer, which, in turn, has separate outputports, each of which is coupled to a different correspondingcontrollable bus line (e.g., a different corresponding general purposecontrollable bus line, such as lines 1010 a-1010 d in FIG. 10 or lines1110 a-1110 d in FIG. 11 ).

The particular controllable bus line to which data is transferred by thedemultiplexer is determined by an input select signal received at aninput select port of the demultiplexer. The input select signal for thedemultiplexer can be stored locally at the tile 102 in a demultiplexerinput select register coupled to the demultiplexer. The input selectcontrol signal can be transferred to the input select register coupledto the demultiplexer from a control tile of the ASIC 100, e.g., from alocal memory of a control tile of the ASIC 100.

The example process described with respect to FIGS. 3A-9B may requirethat the activation values and weight inputs being fully propagatedthroughout the computational arrays of each tile before the cellcomputations are performed, or the cells may perform computations beforeall values are fully propagated. Furthermore, although the ASIC 100 hasbeen described with weight inputs being sent to columns of acomputational array and activation inputs being sent to rows of thecomputational array, in some implementations, the weight inputs are sentto rows of the array and the activation inputs are sent to columns ofthe array.

Furthermore, although the computational arrays have been describedherein as using individual summation circuits within each cell, groupsof cells within the computational array (e.g., all the cells within acolumn) may be coupled directly to a single summation circuit, whichsums the received outputs from the cells in the group, thus reducing thenumber of summation circuits required to store the outputs.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, in computer hardware, including the structures disclosed inthis specification and their structural equivalents, or in combinationsof one or more of them. Embodiments of the subject matter described inthis specification can be implemented as one or more computer programs,i.e., one or more modules of computer program instructions encoded on atangible non transitory program carrier for execution by, or to controlthe operation of, data processing apparatus. Alternatively or inaddition, the program instructions can be encoded on an artificiallygenerated propagated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus forexecution by a data processing apparatus. The computer storage mediumcan be a machine-readable storage device, a machine-readable storagesubstrate, a random or serial access memory device, or a combination ofone or more of them.

The term “data processing apparatus” encompasses all kinds of apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, or multiple processors or computers.The apparatus can include special purpose logic circuitry, e.g., an FPGA(field programmable gate array) or an ASIC. The apparatus can alsoinclude, in addition to hardware, code that creates an executionenvironment for the computer program in question, e.g., code thatconstitutes processor firmware, a protocol stack, a database managementsystem, an operating system, or a combination of one or more of them.

The processes and logic flows described in this specification can beperformed by one or more programmable computers executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA, an ASIC, or a GPGPU (general purpose graphicsprocessing unit).

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinvention or of what may be claimed, but rather as descriptions offeatures that may be specific to particular embodiments of particularinventions. Certain features that are described in this specification inthe context of separate embodiments can also be implemented incombination in a single embodiment. Conversely, various features thatare described in the context of a single embodiment can also beimplemented in multiple embodiments separately or in any suitablesubcombination. Moreover, although features may be described above asacting in certain combinations and even initially claimed as such, oneor more features from a claimed combination can in some cases be excisedfrom the combination, and the claimed combination may be directed to asubcombination or variation of a sub combination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various system modulesand components in the embodiments described above should not beunderstood as requiring such separation in all embodiments, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Particular embodiments of the subject matter have been described. Otherembodiments are within the scope of the following claims. For example,although bus lines are described as “controllable,” not all bus linesneed to have the same level of control. For instance, there can bevarying degrees of controllability, where some bus lines can becontrolled only where some bus lines are restricted in terms of thenumber of tiles from which they can source data or to which they cansend data. In an another example, some bus lines may be dedicated toproviding data along a single direction, such as north, east, west, orsouth as described herein. In some cases, the actions recited in theclaims can be performed in a different order and still achieve desirableresults. As one example, the processes depicted in the accompanyingfigures do not necessarily require the particular order shown, orsequential order, to achieve desirable results. In certainimplementations, multitasking and parallel processing may beadvantageous.

1. An application specific integrated circuit comprising: a plurality oftiles, wherein each tile of the plurality of tiles comprises arespective array of computational cells and respective local memorypositioned proximate to the respective array of computational cells; aplurality of controllable bus lines, wherein the plurality ofcontrollable bus lines comprises a first group of general purposecontrollable bus lines configured to provide data in four differentdirections among the plurality of tiles, wherein the plurality of tilescomprise a plurality of control elements, respectively, wherein eachcontrol element of each tile is configured to control whether data istransferred to the tile from the plurality of controllable bus lines orfrom the tile to the plurality of controllable bus lines, and whereinthe plurality of controllable bus lines comprises a second group of buslines configured to receive, from each tile of the plurality of tiles,data from the array of computational cells of the tile.
 2. Theapplication specific integrated circuit of claim 1, wherein therespective array of computational cells of each tile is configured toperform multiplication and addition operations.
 3. The applicationspecific integrated circuit of claim 1, wherein the plurality of tilesare arranged in a two-dimensional grid.
 4. The application specificintegrated circuit of claim 1, wherein each tile of the plurality oftiles comprises a corresponding sub-array of a systolic array of cells.5. The application specific integrated circuit of claim 1, comprising avector processing unit arranged to receive data outputs from theplurality of tiles.
 6. The application specific integrated circuit ofclaim 5, wherein the vector processing unit is arranged to receive thedata outputs from the second group of bus lines of each tile.
 7. Theapplication specific integrated circuit of claim 1, wherein each generalpurpose controllable bus line of the first group of general purposecontrollable bus lines comprises a plurality of conveyer elements. 8.The application specific integrated circuit of claim 7, wherein theplurality of conveyer elements comprises a plurality of flip-flops. 9.The application specific integrated circuit of claim 7, wherein eachgeneral purpose controllable bus line of the first group of generalpurpose controllable bus lines is configured to transfer data byshifting, at a clock cycle, data from a first conveyer element of thegeneral purpose controllable bus line to a second adjacent conveyerelement of the general purpose controllable bus line.
 10. Theapplication specific integrated circuit of claim 9, wherein each generalpurpose controllable bus line of the first group of general purposecontrollable bus lines is configured to transfer the data from the firstconveyer element to the second adjacent conveyer element on an edge ofthe clock cycle.
 11. The application specific integrated circuit ofclaim 7, wherein the plurality of conveyer elements are spaced apart ata same distance from one another.
 12. The application specificintegrated circuit of claim 7, wherein each control element comprises amultiplexer or a demultiplexer.
 13. The application specific integratedcircuit of claim 12, wherein each multiplexer and demultiplexer iscoupled to a corresponding register configured to store a control signalthat determines a state of the multiplexer or the demultiplexer to whichthe register is coupled.
 14. The application specific integrated circuitof claim 1, comprising a first additional tile, wherein the firstadditional tile is configured to initiate reading and writing operationswith respect to transferring data to and from at least some of theplurality of tiles.
 15. The application specific integrated circuit ofclaim 14, comprising a second additional tile, wherein the secondadditional tile is configured to initiate reading and writing operationswith respect to transferring data to and from at least some of theplurality of tiles.
 16. The application specific integrated circuit ofclaim 15, wherein the first additional tile and the second additionaltile are in a same row of tiles.
 17. the application specific integratedcircuit of claim 14, wherein the first additional tile comprises acorresponding array of computational cells and a corresponding localmemory positioned proximate to the corresponding array of computationalcells.